package cn.mw.cmdb.entity.modelRelation;

import cn.mw.cmdb.entity.PropertyTypeString;
import cn.mw.cmdb.entity.PropertyTypeTime;
import cn.mw.components.mongodb.anno.AutoId;
import cn.mw.components.mongodb.anno.CMDBProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.data.mongodb.core.mapping.Document;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

@Data
@Document("mw_cmdbmd_model_alert_weight")
public class ModelAlertWeightInfo implements Serializable {

    @CMDBProperty(searchType = PropertyTypeString.ID, searchPrefix = "_")
    @AutoId
    @Schema(description = "id")
    private String id;

    @Schema(description = "实例ID")
    private String instanceId;

    @Schema(description = "实例拓扑视图Id")
    private String instanceViewId;

    @Schema(description = "所属模型ID")
    private String ownModelId;

    @Schema(description = "权重")
    private int weight;

    @Schema(description = "告警级别列表")
    private List<String> alertLevelList;

    @CMDBProperty(searchType = PropertyTypeString.ID, keywordSearch = true)
    @Schema(description = "创建人")
    protected Long creater;

    @CMDBProperty(searchType = PropertyTypeTime.ID)
    @Schema(description = "创建时间")
    protected Date createTime;

    @CMDBProperty(searchType = PropertyTypeString.ID, keywordSearch = true)
    @Schema(description = "修改人")
    protected Long modifier;

    @CMDBProperty(searchType = PropertyTypeTime.ID)
    @Schema(description = "修改时间")
    protected Date modificationTime;
}
